package com.hmdp.service;

import com.hmdp.dto.Result;
import com.hmdp.entity.Blog;
import com.baomidou.mybatisplus.extension.service.IService;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 虎哥
 * @since 2021-12-22
 */
public interface IBlogService extends IService<Blog> {

    @ApiOperation(value = "首页查询热点记录")
    Result queryHotBlog(Integer current);

    /*根据blog的id获取blog的信息*/
    Result queryBlogById(Long id);

    /*根据博客id判断某篇博客是否点赞过*/
    Result likeBlog(Long id);

    /*根据博客id查询某篇文章的top5点赞*/
    Result likesByBlogId(Long id);

    /*用户保存博客信息*/
    Result saveBlog(Blog blog);

    /*滚动分页查询*/
    Result queryBlogOfFollow(Long max, Integer offset);
}
